<template>
  <div>
    {{ $store.state }}
    <!-- {{$store.getters}} -->
    <!-- {{a}} -->
    <!-- {{count}} -->
    <!-- {{getternum}} -->
    <button @click="btn">click</button>
  </div>
</template>

<script>
import { mapState, mapActions, mapGetters, mapMutations } from "vuex";
export default {
  methods: {
    ...mapActions("about", ["getnum"]),
    ...mapMutations("about", ["SET_NUM"]),
    btn() {
      // this.getnum()
      this.SET_NUM(9);
      // this.$store.dispatch('getCount')
      // this.$store.commit('SET_NUM',9)
      // this.$store.dispatch('getnum')
      // this.$store.commit('SET_NUM',9)
      // this.$store.commit('SET_COUNT',7)
      // this.$store.dispatch('getCount')
    },
  },
  computed: {
    ...mapGetters("about", ["getternum"]),
    // ...mapState('about', {
    //   count () {
    //     console.log(this)
    //   }
    // })
  },
};
</script>

<style scoped></style>
